import request from '@/utils/request'

// 查询新开桌列表
export function listTable(query) {
  return request({
    url: '/mahjong/table/list',
    method: 'get',
    params: query
  })
}

// 查询新开桌详细
export function getTable(id) {
  return request({
    url: '/mahjong/table/' + id,
    method: 'get'
  })
}

// 新增新开桌
export function addTable(data) {
  return request({
    url: '/mahjong/table',
    method: 'post',
    data: data
  })
}

// 修改新开桌
export function updateTable(data) {
  return request({
    url: '/mahjong/table',
    method: 'put',
    data: data
  })
}

// 删除新开桌
export function delTable(id) {
  return request({
    url: '/mahjong/table/' + id,
    method: 'delete'
  })
}

// 导出新开桌
export function exportTable(query) {
  return request({
    url: '/mahjong/table/export',
    method: 'get',
    params: query
  })
}